home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2002 #11 / Amiga Plus CD - 2002 - No. 11.iso / Tools / Development / PowerD / Pdmod / modules / libraries / amarquee49.m < prev    next >
Encoding:
Text File  |  2002-10-28  |  4.0 KB  |  63 lines

  1. MODULE  'exec/ports'
  2.  
  3. /* This library contains definitions and structures necessary to use amarquee.library. */
  4. /* Different error types that can be returned to the client in QMessages */
  5.  
  6. #define QERROR_NO_ERROR        0        /* Everything is okay */
  7. #define QERROR_UNKNOWN        -1        /* Don't know what the error was. */
  8. #define QERROR_MALFORMED_KEY  -2        /* Keystring could not be parsed or "dir" does not exist */
  9. #define QERROR_NO_SERVER_MEM  -3        /* Server did not have enough mem available to complete request */
  10. #define QERROR_NO_CONNECTION  -4        /* The connection to the server went south */
  11. #define QERROR_UNPRIVILEGED   -5        /* You're not allowed to do that! */
  12. #define QERROR_UNIMPLEMENTED  -6        /* Feature you requested does not exist yet */
  13. #define QERROR_NO_CLIENT_MEM  -7        /* Your computer didn't have enough memory available to complete an action */
  14. #define QERROR_SYS_MESSAGE    -8        /* This message is a "wall" text message from a server admin */
  15. #define QERROR_SEND_DONE      -9        /* This message is a "send done" notification from your client TCP thread (new for v47) */
  16.  
  17. /* These error types may be returned by QFreeSession() after a QSession
  18.    allocation attempt fails. */
  19.  
  20. #define QERROR_NO_TCP_STACK     -20     /* TCP stack wasn't running */
  21. #define QERROR_HOSTNAME_LOOKUP  -21     /* Hostname lookup of server failed */
  22. #define QERROR_ABORTED          -22     /* TCP thread got a control-C */
  23. #define QERROR_NO_SERVER        -23     /* No AMarquee server at requested host/port */
  24. #define QERROR_NO_INETD         -24     /* The program wasn't launched by inetd */
  25. #define QERROR_ACCESS_DENIED    -25     /* The server wouldn't accept our connection */
  26.  
  27. /* Flags to use with QGo() */
  28.  
  29. #define QGOF_SYNC    (1<<0)             /* Request notification via sync packet when all has settled on the server side */
  30. #define QGOF_NOTIFY  (1<<1)             /* Request notification via QERROR_SEND_DONE message when the TCP thread has finished sending this transaction (new for v47) */
  31.  
  32. /* Flags representing special privileges; used with QRequestPrivileges(), etc */
  33.  
  34. #define QPRIV_KILLCLIENTS         (1<<0)        /* license to kill! */
  35. #define QPRIV_ADMIN               (1<<1)        /* Ability to set env vars, etc, on the server */
  36. #define QPRIV_GETSYSMESSAGES      (1<<2)        /* Ability to receive special sysadmin messages */
  37. #define QPRIV_SENDSYSMESSAGES     (1<<3)        /* Ability to send special sysadmin messages */
  38. #define QPRIV_ALL                 ( $0F)        /* all possible QPRIV_* bits */
  39.  
  40. /* All events from AMarquee come in this package! */
  41.  
  42. OBJECT QMessage
  43.         Msg:Message,            /* Don't directly use the contents of qm_Msg! */
  44.         ID:LONG,                /* Message ID # of transaction related to this opCode, or -1 if no ID is applicable. */
  45.         Status:LONG,            /* One of the QERROR_* codes defined in AMarquee headers. */
  46.         Path:PTR TO UBYTE,      /* Pathname of a node, or NULL if not applicable. */
  47.         Data:VOID,       /* Pointer to beginning of data buffer, or NULL if not applicable. */
  48.         DataLen:ULONG,          /* Length of qm_Data buffer, or 0 if not applicable. */
  49.         ActualLen:ULONG,        /* Length of the data buffer stored on the AMarquee server. */
  50.         ErrorLine:ULONG,        /* Line # of the server source code that generated the error.  Useful for debugging. */
  51.         Private:VOID     /* Private info used by FreeQMessage() */
  52.  
  53. OBJECT QSession
  54.         qMsgPort:PTR TO MsgPort     /* Wait() on this for QMessages! */
  55.  
  56. OBJECT QRunInfo
  57.         Allowed:LONG,           /* The theoretical maximum number of bytes your server may allocate. */
  58.         Alloced:LONG,           /* The number of bytes currently allocated by your server. */
  59.         Avail:LONG,             /* The number of bytes that may actually be allocated by your server. */
  60.         CurrentPrivs:ULONG,     /* Bit-chord of QPRIV_* bits, showing what special privs you have. */
  61.         PossiblePrivs:ULONG     /* Bit-chord of QPRIV_* bits, showing what special privs you could get if you asked. */
  62.  
  63.